import { v4 as uuidv4 } from 'uuid';
export const getUUID = () => {
    // 先从本地存储获取uuid (看一下本地存储里面是否有)
    let uuid_toKen = localStorage.getItem('UUIDTOKEN')
    if(!uuid_toKen) {
        // 生成游客临时身份
        uuid_toKen = uuidv4();
        // 本地存储存储一次
        localStorage.setItem('UUIDTOKEN',uuid_toKen)
    }
    return uuid_toKen;
}